package com.aruio.spring.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @Description panda事件监听器
 * @Date 2024/9/25 16:57
 * @Created by 10574
 */
@Slf4j
@Component
public class PandaEventListener {
    @EventListener(classes = PandaNotBirthdaySetEvent.class)
    @Async
    public void onPandanNotBirthdaySetEvent(PandaNotBirthdaySetEvent event) {
        log.info("-----查询熊猫手机号-----");
        log.info("-----发送未设置生日短信，并提醒生日可领取优惠卷-----");
    }

    @EventListener(classes = PandaBirthdayEvent.class)
    @Async
    public void onPandanBirthdayEvent(PandaBirthdayEvent event) {
        log.info("-----查询熊猫手机号-----");
        log.info("-----发送优惠卷领取链接短信-----");
    }
}
